import Vue from 'vue'
import store from '@/store'

/**
 * 页面之间传递大额参数
 * 借助vuex传递
 * @param {Object} params
 */
export const setPageParams = function(key, params) {
	store.dispatch('page/setParams', {
		key,
		params
	})
}

export const getPageParams = function(key) {
	const pageParams = store.getters.pageParams || {}
	return pageParams[key]
}
